package com.hrm.common.interceptor;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * controller处理前的拦截器
 * 简化token数据在controller中的代码编写
 * 1、判断是否登录
 * 2、统一的用户权限校验
 * 3、判断用户是否具有当前访问接口权限
 */
@Component
public class CommonInterceptor extends HandlerInterceptorAdapter {

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        return true;
    }

}
